package com.ds.dsfans.liteflow.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ds.dsfans.liteflow.mapper.LiteflowScriptMapper;
import com.ds.dsfans.liteflow.domain.LiteflowScript;
import com.ds.dsfans.liteflow.service.ILiteflowScriptService;
import com.ds.dsfans.common.core.text.Convert;

/**
 * 规则引擎scriptService业务层处理
 * 
 * @author dsfans
 * @date 2024-07-15
 */
@Service
public class LiteflowScriptServiceImpl implements ILiteflowScriptService 
{
    @Autowired
    private LiteflowScriptMapper liteflowScriptMapper;

    /**
     * 查询规则引擎script
     * 
     * @param id 规则引擎script主键
     * @return 规则引擎script
     */
    @Override
    public LiteflowScript selectLiteflowScriptById(Long id)
    {
        return liteflowScriptMapper.selectLiteflowScriptById(id);
    }

    /**
     * 查询规则引擎script列表
     * 
     * @param liteflowScript 规则引擎script
     * @return 规则引擎script
     */
    @Override
    public List<LiteflowScript> selectLiteflowScriptList(LiteflowScript liteflowScript)
    {
        return liteflowScriptMapper.selectLiteflowScriptList(liteflowScript);
    }

    /**
     * 新增规则引擎script
     * 
     * @param liteflowScript 规则引擎script
     * @return 结果
     */
    @Override
    public int insertLiteflowScript(LiteflowScript liteflowScript)
    {
        return liteflowScriptMapper.insertLiteflowScript(liteflowScript);
    }

    /**
     * 修改规则引擎script
     * 
     * @param liteflowScript 规则引擎script
     * @return 结果
     */
    @Override
    public int updateLiteflowScript(LiteflowScript liteflowScript)
    {
        return liteflowScriptMapper.updateLiteflowScript(liteflowScript);
    }

    /**
     * 批量删除规则引擎script
     * 
     * @param ids 需要删除的规则引擎script主键
     * @return 结果
     */
    @Override
    public int deleteLiteflowScriptByIds(String ids)
    {
        return liteflowScriptMapper.deleteLiteflowScriptByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除规则引擎script信息
     * 
     * @param id 规则引擎script主键
     * @return 结果
     */
    @Override
    public int deleteLiteflowScriptById(Long id)
    {
        return liteflowScriptMapper.deleteLiteflowScriptById(id);
    }
}
